#define DEBUG
#include <cstdio>

using namespace std;

const int maxn=2000000, inf=0x7fffffff;

int min(int a, int b) {
  return a<b ? a : b;
}

int main() {
#ifdef DEBUG
  freopen("2.in", "r", stdin);
  freopen("2_checker.out", "w", stdout);
#endif

  static int f[maxn+1], s[maxn+1];
  int n;
  scanf("%d %d", &n, s);
  for (int i=1; i<=n; i++) {
    int ball;
    scanf("%d", &ball);
    s[i] = s[i-1]+ball;
  }

  f[0] = 0;
  for (int i=1; i<=n; i++) {
    f[i] = inf;
    for (int j=i-1; j>=0; j--) {
      if (s[j]-f[j]>=i*100) {
	f[i] = min(f[i], f[j])+i*100;
      }
      if (f[i]<0) {
	f[i] = inf;
      }
    }
  }

  if (s[n]<f[n]) {
    printf("-1");
  } else {
    printf("%d", s[n]-f[n]);
  }

  return 0;
}
